package com.warm.middle.schedule.anno;

import org.springframework.stereotype.Component;

/**
 * @Date: 2019/12/3 15:49
 * @Author: LChuang
 * @Description: Spring 自带的 @Scheduled
 */
@Component
public class SpringSchedule {

    /**
     * 1. 启动类添加@EnableScheduling
     * 2. 定时任务方法上添加@Scheduled
     */

    //@Scheduled(cron = "1/5 * * * * ?")
    public void testScheduled(){
        System.out.println("Schedule test!");
    }
}
